package cn.wolfcode.qo;

import cn.hutool.core.date.DateUtil;
import cn.wolfcode.enums.BusinessReportEnum;
import cn.wolfcode.util.UserContext;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter

public class NoticeQueryObject extends QueryObject {

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;//开始
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;
    //公告级别
    private Integer level;

    private Boolean msgStatus;

    //是否是管理员
    public Boolean getAdmin(){
        return UserContext.getCurrentUser().isAdmin();
    }
}
